<!--
 * @description  : 案件-证据复制提取单文书
 * @descriptionDetail: 案件-证据复制提取单文书
 * @copyright    : 浙江烟草
 * @author       : sy
 * @create       : 2022-08-25 15:43:11
-->
<template>
  <view class="page">
    <!-- #ifdef H5-ONLY -->
    <theme-navbar :is-white="false" :title="navTitle" :custom-back="goBack" style="z-index: 99999">
      <view class="white-color" @click="printOrDown(state.canEdit)">
        {{ state.canEdit?'预览':'打印' }}
      </view>
    </theme-navbar>
    <!-- #endif -->
		<!-- #ifdef H5-WECHAT || H5-EMP -->
		<fab-button :content="state.canEdit?fContent:fContents" @fabtrigger="fabtrigger" />
		<!-- #endif -->
    <!-- 表单开始 -->
    <view class="content">
      <u-form
        label-width="auto"
        :model="docCopyForm"
        :label-position="labelPosition"
        :error-type="errorType"
        :rules="rules"
        class="form-content"
        ref="uForm"
      >
        <u-form-item
          label="复制（提取）时间"
          :required="isRequired"
          prop="getTime"
          :label-position="labelPosition"
          right-icon="arrow-right"
          ref="changeRefT"
        >
          <u-input
            placeholder="请输入复制（提取）时间"
            class="right-text"
            :disabled="true"
            :clearable="false"
						:custom-style="pointerStyle"
            v-model="docCopyForm.getTime"
            @click="()=>{if(state.canEdit) clickDateBtn('time')}"
          />
        </u-form-item>
        <u-form-item :border-bottom="false" label="复制（提取）地点" label-width="auto" label-position="left" prop="getAddress">
          <u-icon
            slot="right"
            customPrefix="csbi-icon"
            name="moban"
            size="40"
            :color="$theme.u_type_primary"
            @click="tapFieldPress('getAddress')"
          ></u-icon>
        </u-form-item>
        <u-form-item label="" label-position="top">
          <u-input
            placeholder="请输入复制（提取）地点"
            :disabled="!state.canEdit"
            v-model="docCopyForm.getAddress"
            maxlength="100"
          />
        </u-form-item>
        <u-form-item label="提供人(单位)" :required="isRequired" :label-position="labelPosition" prop="providerOrg">
          <u-input
            placeholder="请输入提供人(单位)"
            :disabled="!state.canEdit"
            v-model="docCopyForm.providerOrg"
            maxlength="100"
          />
        </u-form-item>
        <u-form-item label="证据名称" :rightIcon="state.canEdit ? 'arrow-right' : ''" :required="isRequired" prop="fullDocNo">
			<u-input v-if="afterName" @click="state.canEdit && showMultiDic($u.dic.DIC_KEYS.C_EVID_PHOTO_TYPE,docCopyForm.evidType)"  type="textarea" placeholder="请填写其他证据说明" :maxlength="maxLength"   v-model="afterName" />
          <dic-input
		  v-else
            :keyWord="$u.dic.DIC_KEYS.C_EVID_PHOTO_TYPE"
            :dicCode="docCopyForm.evidType"
            type="textarea"
            :border="false"
            :select-open="dicMultiSelectOpen($u.dic.DIC_KEYS.C_EVID_PHOTO_TYPE)"
            placeholder="请选择"
            v-model="docCopyForm.fullDocNo"
            :disabled="true"
            @changeInputModelData="(name)=>{$set(docCopyForm, 'fullDocNo', name)}"
            @click="state.canEdit && showMultiDic($u.dic.DIC_KEYS.C_EVID_PHOTO_TYPE,docCopyForm.evidType)"
          />
        </u-form-item>
				<!-- 证据复制提取单 其他类型 显示其他说明情况 fsx 2024-1-15 开始 -->
				<u-form-item label="其他证据说明" prop="qitaNo" v-if="isEvidTypeOther">
				   <u-input type="textarea" placeholder="请填写其他证据说明" :maxlength="maxLength"  :disabled="!state.canEdit" v-model="qitaNo" />
				</u-form-item>
				<!-- 证据复制提取单 其他类型 显示其他说明情况 zx 2024-1-15 结束 -->
				<!-- 证据复制提取单 自定义说明情况 zx 2024-4-16 开始 -->
				<u-form-item label="自定义" prop="customPhoto" v-if="iscustomPhoto">
				   <u-input type="textarea" placeholder="自定义说明情况" :maxlength="maxLength"  :disabled="!state.canEdit" v-model="docCopyForm.customPhoto" />
				</u-form-item>
				<!-- 证据复制提取单 自定义说明情况 zx 2024-4-16 结束 -->
        <u-form-item :border-bottom="false" label="说明事项" label-width="auto" label-position="left" prop="explainItem">
          <u-icon
            slot="right"
            customPrefix="csbi-icon"
            name="moban"
            size="40"
            :color="$theme.u_type_primary"
            @click="tapFieldPress('explainItem')"
          ></u-icon>
        </u-form-item>
        <u-form-item label="" label-position="top">
          <u-input type="textarea" placeholder="请填写说明事项" :maxlength="maxLength" :disabled="!state.canEdit" v-model="docCopyForm.explainItem" />
        </u-form-item>
        <u-form-item label="执法人员及执法证号" :border-bottom="false" label-position="left" :required="true">
          <view
            slot="right"
            class="uicon-sty"
            :style="isCanClick?'pointer-events: none;':''"
            @click="()=>{if(state.canEdit) personSelectShow = true}"
          >
            <u-icon name="plus-circle" :color="$theme.u_type_primary" size="40"></u-icon>
          </view>
        </u-form-item>
        <u-form-item label="" prop="lePerson">
          <u-input
            type="textarea"
            height="100"
            :auto-height="true"
            placeholder="请选择"
            :disabled="true"
						:custom-style="pointerStyle"
            v-model="docCopyForm.lePerson"
          />
        </u-form-item>
        <u-form-item
          label="文书日期"
          label-width="200"
          right-icon="arrow-right"
          :required="true"
          ref="docDateChangeRef"
        >
          <u-input
            :disabled="true"
            placeholder="请选择日期"
						:custom-style="pointerStyle"
            v-model="docCopyForm.docDate"
            @click="()=>{state.canEdit&&(isShowDocDate = true)}"
          />
        </u-form-item>
        <u-gap :marginRight="getGapMarginRowNumber()" :marginLeft="getGapMarginRowNumber()" :height="$theme.cm_section_top_gap_height" :bg-color="$theme.cm_form_item_bottom_border_color"></u-gap>
        <form-section title="证据"></form-section>
        <!-- 图片上传开始 -->
        <u-form-item label="（证据粘贴处）" :label-position="labelPosition" :border-bottom="false">
          <view class="zk-img-content">
            <m-upload
              :deletable="state.canEdit"
              :maxCount="picIds"
              width="150rpx"
              height="150rpx"
              :file-list="fileList"
              :multiple="picIds==1?false:true"
              index="fileList"
              :uploadParam="{'fiGroupCode':$FILE_GROUP_TYPE.c_evid_copy_attr}"
              upApiUrl="uploadBase64File"
              ref="filePicUpload"
              @on-list-change="changeUpload"
            >
            </m-upload>
          </view>
        </u-form-item>
        <!-- 表单结束 -->
      </u-form>
    </view>
    <!-- 底部按钮开始 -->
    <view class="submit-btns btn-other-cls" v-if="state.canEdit">
      <u-button plain class="u-btn" type="primary" @click="submitBtn('save')">
        保存
      </u-button>
      <u-button class="u-btn" type="primary" @click="submitBtn('submit')">
        提交
      </u-button>
    </view>
    <!-- 底部按钮结束 -->
    <!-- 人员选择 -->
    <u-popup mode="bottom" height="80%" v-model="personSelectShow">
      <person-selection :params="psParam" @choose="handlerChoosePerson"></person-selection>
    </u-popup>
    <!-- 日期控件 -->
    <u-picker mode="time" :params="paramsDate" v-model="isShowTime" @confirm="changeGetTime">
    </u-picker>
    <u-calendar mode="date" :max-date="yestDate" v-model="isShowDocDate" @change="changeDate('docDate',$event)">
    </u-calendar>
    <!-- 数据字典 -->
    <dic-choice
      :keyWord="dicKeyWords"
      :currentSelect="dicCurrentSelect"
      v-model="dicShow"
      @confirm="selectDicConfirm"
    ></dic-choice>
    <u-popup mode="bottom" height="50%" v-model="mulitChoiceShow">
      <dic-multi-choice :keyWord="dicKeyWords" :defaultUids="dicCurrentSelect" @select="multiChoiceConfirm"></dic-multi-choice>
    </u-popup>
    <u-popup mode="bottom" height="80%" v-model="showFieldTpl">
      <doc-form-content-tep
        :params="fieldParam"
        formName="docCopyForm"
        :fieldkey="fieldKey"
        @choice="choiceFieldTpl"
      ></doc-form-content-tep>
    </u-popup>
  </view>
</template>

<script>
	import caseCommon from "../caseCommonMixin.js";
	import caseService from '@/service/case/case.service.js';
	import officeService from "@/service/case/office.service.js";
	import commonService from '@/service/common/common.service';
	import moment from "moment";
	import PersonSelection from "@/pages/case/components/personSelection.vue";
	import mUpload from '@/components/m-upload.vue';
	import FormSection from "@/components/form-section.vue";
	import DicChoice from "@/components/dic_choice.vue";
	import DicInput from "@/components/dic_input.vue";
	import DicMultiChoice from "@/components/dic_multi_choice.vue";
	import DocFormContentTep from "../components/docFormContentTemplate.vue";
	import fabButton from '@/components/uni-fab.vue';
		import {
		dateUtils,
	} from "@/common/util";

	export default {
		components: {
			PersonSelection,
			mUpload,
			FormSection,
			DicChoice,
			DocFormContentTep,
			DicInput,
			DicMultiChoice,
			fabButton
		},
		mixins: [caseCommon, ],
		data() {
			return {
				moment,
				paramsDate: {
					year: true,
					month: true,
					day: true,
					hour: true,
					minute: true,
					second: false,
					timestamp: true,
				},
				errorType: ['border-bottom', 'message', ],
				isRequired: true, // 是否显示必填项
				labelWidth: '280',
				labelPosition: 'top',
				maxLength: 9999, // 文本域可输入的最大值
				isShowTime: false, // 复制提取时间控件是否显示
				isCanClick: false, // 是否可点击执法人员及执法证号按钮
				docCopyForm: {
					evidType:"",
				},
				employeeLst: [],
				caseParam: {}, // 上个页面传过来的参数
				fileList: [],
				rules: {
					getTime: [{
						required: true,
						message: '请选择复制（提取）时间',
						trigger: ['change', 'blur', ],
					}, ],
					inputDate: [{
						required: true,
						message: '请选择文书录入时间',
						trigger: ['change', 'blur', ],
					}, ],
					getAddress: [{
						max: 50,
						message: '复制（提取）地点长度请输入50个字符之间！',
						trigger: 'change',
					}, ],
					explainItem: [{
						required: true,
						message: '请填写说明事项！',
						trigger: 'change',
					}, {
						max: 400,
						message: '说明事项长度请输入400个字符之间！',
					}, ],
					fullDocNo: [{
						required: true,
						message: '请选择证据类型',
						trigger: ['change', 'blur', ],
					}, ],
				},
				doc: {},
				personSelectShow: false,
				psParam: {
					min: 2,
				},
				picIds: 4,
				maxDate: '2099-12-31',
				isShowDocDate: false,
				yestDate: this.$u.timeFormat(Date.now()),
				dicShow: false, // dic_select 是否显示
				dicKeyWords: "", // dic 关键字
				dicCurrentSelect: "", // dic 当前选择项
				mulitChoiceShow: false,
				fContent: [{
					iconPath: require('@/static/oview.png'),
					selectedIconPath: require('@/static/oview.png'),
					text: '预览',
					active: false,
				}],
				fContents: [{
					iconPath: require('@/static/dy.png'),
					selectedIconPath: require('@/static/dy.png'),
					text: '打印',
					active: false,
				}],
				// h5端部分浏览器input设置disabled后点击事件失效 2023-10-27 fsx start
				pointerStyle: {
				  marginRight: "5px",
					pointerEvents: "none !important"
				},
				// h5端部分浏览器input设置disabled后点击事件失效 2023-10-27 fsx end
				
				// 证据复制提取单 其他类型 显示其他说明情况 fsx 2024-1-15 开始
				isEvidTypeOther:false,
				// 证据复制提取单 其他类型 显示其他说明情况 fsx 2024-1-15 结束
				// 证据复制提取单 自定义说明情况 fsx 2024-4-16 开始
				iscustomPhoto:false,
				qitaNo:'',
				afterName:''
				// 证据复制提取单 自定义说明情况 zx 2024-4-16 结束
			
			}
		},
		watch: {
			isShowTime(newValue, oldValue) {
				this.$refs.changeRefT.validation();
			},
			isShowDocDate() {
				this.$refs.docDateChangeRef.validation();
			},
		},
		onReady() {
			this.$refs.uForm.setRules(this.rules);
		},
		onLoad() {
			this.caseParam = this.getRouteParam();
			this.psParam.caseUuid = this.caseParam.caseUuid;
			console.log('参数：' + JSON.stringify(this.caseParam));
		},
		mounted() {
			this.docStep((docInfo) => {
				this.doc = docInfo;
				this.setRightBtns();
			});
			this.initDocData();
		},
		methods: {
			// 数据字典组件选择事件
			dicSelectOpen: function(keyWords) {
				console.log(this.dicShow)
				if (this.dicKeyWords == keyWords && this.dicShow) {
					console.log(keyWords)
					return true;
				}
				return false;
			},
			showDic: function(key, cur) {
				if (this.dicShow) return;
				this.dicKeyWords = key;
				this.dicCurrentSelect = cur;
				this.dicShow = true;
			},
			dicMultiSelectOpen(type, keyWords) {
				if (type == this.dicType) {
					if (this.dicKeyWords == keyWords && this.mulitChoiceShow) {
						return true;
					}
					return false;
				}
			},
			showMultiDic(key, cur, type) {
				if (this.mulitChoiceShow) return;
				this.dicKeyWords = key;
				this.dicCurrentSelect = cur;
				this.mulitChoiceShow = true;
				this.dicType = type;
			},
			multiChoiceConfirm(e) {
				
				this.afterName=''
				// console.log(e)
				// debugger
				this.mulitChoiceShow = false;
				let labels = [];
				let codes = [];
				let hasParentlabels=[];
				let hasParentcodes=[];
				e.forEach(itm => {
					if(itm.parentBcbCode && itm.parentBcbCode=='01'){
						hasParentlabels.push(itm.bcbName);
						hasParentcodes.push(itm.bcbCode);
					}else{
						labels.push(itm.bcbName);
						codes.push(itm.bcbCode);
					}
					
					
				});
				
				if (this.dicKeyWords == this.$u.dic.DIC_KEYS.C_EVID_PHOTO_TYPE) { // 未办证原因
					if(hasParentlabels.length>0){
						if(labels.indexOf('现场照片') > -1){
							labels = labels.filter(function(item) {
								return item !== "现场照片"
								});
							this.docCopyForm.fullDocNo='现场照片('+hasParentlabels.join(',')+'),'+labels.join(',')
							this.docCopyForm.evidType = codes.join(',')+','+hasParentcodes.join(',');
						}else{
							this.docCopyForm.fullDocNo='现场照片('+hasParentlabels.join(',')+'),'+labels.join(',')
							this.docCopyForm.evidType = codes.join(',')+','+hasParentcodes.join(',');
						}
					}else{
					this.docCopyForm.fullDocNo=labels.join(',')
					this.docCopyForm.evidType = codes.join(',')
					}
					
					// this.docCopyForm.fullDocNo = labels.join(',');
					
					this.afterName=this.docCopyForm.fullDocNo
					// 证据复制提取单 其他类型 显示其他说明情况 fsx 2024-1-15 开始
					this.getEvidTypeOther();
					// 证据复制提取单 其他类型 显示其他说明情况 fsx 2024-1-15 结束
				}
			},
			selectDicConfirm: function(e) {
				if (this.dicKeyWords == this.$u.dic.DIC_KEYS.C_EVID_PHOTO_TYPE) {
					// 状态
					this.docCopyForm.fullDocNo = e[0].label;
					this.docCopyForm.evidType = e[0].extra.bcbCode;
					// 证据复制提取单 其他类型 显示其他说明情况 fsx 2024-1-15 开始
					this.getEvidTypeOther();
					// 证据复制提取单 其他类型 显示其他说明情况 fsx 2024-1-15 结束
				}
			},
			// 证据复制提取单 自定义说明情况，否者不显示，清空其他情况说明 zx 2024-4-16 开始
			// customPhotoBlur(){
				// if(this.docCopyForm.customPhoto){
				// 	this.docCopyForm.fullDocNo=this.replaceIfContains(this.docCopyForm.fullDocNo,'自定义',this.docCopyForm.fullDocNo)
				// }
			// },
			// qitaNoBlur(){
				// if(this.qitaNo){
				// 	this.docCopyForm.fullDocNo=this.replaceIfContains(this.docCopyForm.fullDocNo,'其他证据',this.qitaNo)
				// }
			// },
			replaceIfContains(str, searchChar, replaceWith) {
			return str.indexOf(searchChar) != -1 ? str.replace(searchChar, replaceWith) : str;
			},
			// 证据复制提取单 自定义说明情况，否者不显示，清空其他情况说明 zx 2024-4-16 开始
			// 证据复制提取单 其他类型 显示其他说明情况，否者不显示，清空其他情况说明 fsx 2024-1-15 开始
			getEvidTypeOther(){
				if(this.docCopyForm.evidType.indexOf("08") > -1) {
					this.isEvidTypeOther = true;
				} else {
					this.isEvidTypeOther = false;
					this.qitaNo = "";
				}
				if(this.docCopyForm.evidType.indexOf("0113") > -1) {
					this.iscustomPhoto = true;
				} else {
					this.iscustomPhoto = false;
					this.docCopyForm.customPhoto = "";
				}
			},
			
			// 证据复制提取单 其他类型 显示其他说明情况，否者不显示，清空其他情况说明 fsx 2024-1-15 结束
			getGapMarginRowNumber() {
				return "-" + this.$theme.cm_content_paddng_row.replace('rpx', '');
			},
			initDocData() {
				let parms = {
					id: this.caseParam.id,
					docUuid: this.caseParam.docUuid,
					bizUuid: this.caseParam.bizUuid,
				}
				this.$u.loading('加载中...');
				officeService.docFields(this.caseParam.docUuid, true).then(docConfigs => {
					if (docConfigs.success) {
						this.docFields = [...docConfigs.data, ];
						officeService.getDocCopyEvidenceDoc(parms).then((res) => {
							this.$u.hideLoading();
							let [tiInfo, rs, ] = [{}, {}, ];
							if (res.success && res.data.length === 2) {
								tiInfo = res.data[0];
								rs = res.data[1];
								Object.keys(tiInfo).forEach(key => {
									rs[key] = tiInfo[key];
								});
							} else {
								rs = res.data[0];
							}
							this.docCopyForm = rs;
							this.docCopyForm.providerOrg = this.docCopyForm.providerOrg ? this.docCopyForm.providerOrg : this.curUser.user.org.orgShortName;
							// 证据复制提取单 其他类型 显示其他说明情况， fsx 2024-1-15 开始
							this.getEvidTypeOther();
							// 证据复制提取单 其他类型 显示其他说明情况， fsx 2024-1-15 结束
							if (rs.fileList) {
								rs.fileList.forEach(item => {
									item.gfiId = item.fileId;
								});
								this.fileList = [...rs.fileList, ];
							}
						}).catch(er => {
							console.log(er);
							this.$u.hideLoading();
							this.$u.toast(er);
						});
					} else {
						this.$u.toast(docConfigs.msg);
					}
				}).catch(er => {
					console.log(er);
					this.$u.hideLoading();
					this.$u.toast(er);
				});
			},
			// 设置右侧标题
			setRightBtns() {
				// #ifdef H5-DINGDING
				this.$deviceApi.setRight(this.state.canEdit ? '预览' : '打印', () => {
					this.printOrDown(this.state.canEdit);
					this.setRightBtns();
				}, true, true);
				// #endif
			},
			fabtrigger(btn) {
				if (btn.index == 0) {
					this.printOrDown(this.state.canEdit);
				}
			},
			// 打印/预览
			printOrDown(flag) {
				if (flag) {
					// 调接口预览
					this.submitBtn('preview');
				} else {
					this.downloadFile(this.doc.pdfFileId);
				}
			},
			downloadFile(fileId, titleName, isDownload) {
				let pdfIds = fileId;
				if (!pdfIds) {
					this.$u.toast("没有文书");
					return;
				}
				this.setRouteParam({
					fileId: pdfIds,
					fileName: titleName,
					isDownload: isDownload,
				});
				this.$u.route('pages/commonPage/printerComponent');
			},
			clickDateBtn(type) {
				// 日期禁用
				if (type == 'time') {
					this.isShowTime = true;
				}
			},
			// 点击提交、保存按钮
			submitBtn(type) {
				this.$refs.uForm.validate(valid => {
					if (valid) {
						if (type == 'submit') {
							this.$modal.confirm("完成后不可修改，请确认是否填写完整准确无误？", () => {
								this.submitDocInfo(type);
							});
						} else {
							this.submitDocInfo(type);
						}
					}
				});
			},
			// 调用保存、提交接口
			submitDocInfo(type) {
				console.log(this.afterName)
				if(this.qitaNo){
					this.docCopyForm.fullDocNo=this.replaceIfContains(this.docCopyForm.fullDocNo,'其他证据',this.qitaNo)
					console.log(this.docCopyForm.fullDocNo)

				}
				if(this.docCopyForm.customPhoto){
					this.docCopyForm.fullDocNo=this.replaceIfContains(this.docCopyForm.fullDocNo,'自定义',this.docCopyForm.customPhoto)
					console.log(this.docCopyForm.fullDocNo)
				}
				// 保存/提交
				console.log(this.docCopyForm.fullDocNo)
				let {
					id,
					docUuid,
					titemUuid,
				} = this.caseParam;
				let newFileIds = [];
				this.fileList.forEach((item) => {
					newFileIds.push({
						fileId: item.gfiId,
					});
				});
				this.docCopyForm.fileList = newFileIds;
				// this.qitaNo = this.docCopyForm.fullDocNo;
				type == 'save' && this.$u.loading('数据保存中...');
				officeService.saveDocCopyEvidenceDoc(this.docCopyForm, docUuid, titemUuid, id, this.caseParam.type)
					.then(
						res => {
							this.$u.hideLoading();
							if (res.success) {
								this.docCopyForm = res.bean;
								try {
									if (!this.doc) this.doc = res.data[0];
								} catch (e) {
									console.log(e);
								}
								if (type == 'preview') {
									officeService.buildLocalPunish("/survey/doc-evid-copy", this.doc.docInsUuid).then(
										pdfId => {
											if (pdfId.success) {
												this.downloadFile(pdfId.bean, "预览", false);
											} else {
												this.$u.toast(pdfId.msg);
											}
										});
								} else if (type == 'submit') {

									this.$u.loading('数据提交中...');
									officeService.submitDocCopyEvidenceDoc(this.docCopyForm, docUuid, titemUuid, id,
										this
										.caseParam.type).then(res => {
										this.$u.hideLoading();
										this.saveBehaviorLog(1, this.caseParam, this.doc);
										this.$u.toast(res.msg);
										if (res.success) {
											this.backPrev({
												paramKey: "offiList",
												param: {
													caseUuid: this.caseParam.bizUuid,
												},
											});
										}
									}).catch(er => {
										console.log(er);
										this.$u.hideLoading();
										this.$u.toast(er);
									});
								} else {
									this.saveBehaviorLog(0, this.caseParam, this.doc);
									this.$u.toast(res.msg);
								}
							} else {
								this.$u.hideLoading();
								this.$u.toast(res.msg);
							}
						})
			},
			// 选择执行人
			handlerChoosePerson(e) {
				this.personSelectShow = false;
				this.employeeLst = [...e, ];
				let tIds = [];
				let tNames = [];
				this.employeeLst.forEach(el => {
					tIds.push(el.personUuid);
					tNames.push(el.personName + "(" + el.leCertNo + ")");
				});
				this.docCopyForm['lePersonUuids'] = tIds.join(",");
				this.docCopyForm['lePerson'] = tNames.join(",");
			},
			// 获取日期
			changeGetTime(e) {
				this.$set(this.docCopyForm, "getTime", this.$u.date(e.timestamp, 'yyyy年mm月dd日 hh时MM分'));
			},
			changeDate(type, e) {
				this.docCopyForm[type] = dateUtils.dateFormat("yyyy年MM月dd日", new Date(e.result));
				this.$refs.docDateChangeRef.validation();
			},
			// 上传/删除图片事件
			changeUpload(list, key) {
				if (list.length > 0) {
					this.fileList = [...list, ];
				} else {
					this.fileList = [];
				}
			},
		},
	}
</script>

<style lang="scss" scoped>
	@import "../case_common.scss";

	.page {
		padding: 0;
	}

	.content {
		padding: 0 $cm-content-paddng-row 80px;
	}

	.space-gap {
		margin: 0 -15px -10px -15px;
	}

	.p-title {
		width: 100%;
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		align-items: center;
	}

	.input-text1 {
		/deep/.uni-textarea-textarea {
			border-bottom: 1px solid #999;
			padding-bottom: 5px;
		}
	}

	.input-text {
		display: inline-flex;
		width: auto;
		text-align: center !important;
		flex: none;

		/deep/ .uni-input-input {
			border-bottom: 1px solid #999;
			padding-bottom: 5px;
		}

		/deep/.uni-textarea-textarea {
			border-bottom: 1px solid #999;
			padding-bottom: 5px;
		}
	}
</style>